package com.zhijian.medical.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 所有实验步骤的状态枚举类
 *
 * @author HCG
 * @version 1.0
 * @date 2022/9/1
 */
@AllArgsConstructor
@Getter
public enum AllExperimentationStepStatusEnum {

    UN_END(0, "未完成"),
    END(1, "已完成"),;

    private Integer code;
    private String desc;

    public static AllExperimentationStepStatusEnum getByCode(Integer code) {
        AllExperimentationStepStatusEnum[] allExperimentationStepStatusEnums = AllExperimentationStepStatusEnum.values();
        for (AllExperimentationStepStatusEnum allExperimentationStepStatusEnum : allExperimentationStepStatusEnums) {
            if (allExperimentationStepStatusEnum.getCode().equals(code)) {
                return allExperimentationStepStatusEnum;
            }
        }
        return null;
    }

}
